import ajax from '@/utils/request'

// 获取部门列表
export function getDepartments() {
  return ajax({
    url: '/company/department'
  })
}

// 删除部门列表
export function deleteDepartments(id) {
  return ajax({
    method: 'DELETE',
    url: '/company/department/' + id
  })
}

// 添加新部门
export function addDepartments(data) {
  return ajax({
    method: 'post',
    url: '/company/department/',
    data
  })
}

